Host undercloud-root
    Hostname {{ undercloud_ip }}
    IdentityFile {{ local_working_dir }}/id_rsa_undercloud
    IdentitiesOnly yes
    User root
    StrictHostKeyChecking no

Host undercloud
    Hostname {{ undercloud_ip }}
    IdentityFile {{ local_working_dir }}/id_rsa_undercloud
    IdentitiesOnly yes
    User {{ undercloud_user }}
    StrictHostKeyChecking no


{% if groups["overcloud"] is defined %}
{% for host in groups["overcloud"] %}

Host {{ host }}
    Hostname {{ hostvars[host].ansible_host }}
    ProxyCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=60 -F {{ local_working_dir }}/ssh.config.local.ansible undercloud -W {{ hostvars[host].inventory_ip }}:22
    IdentityFile {{ local_working_dir }}/id_rsa_overcloud
    User {{ overcloud_user | default('tripleo-admin') }}
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null

{% endfor %}
{% endif %}
